import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;

public class AssigneeTaskListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        if (delegateTask.getName().equals("部门经理审批")) {
            delegateTask.setAssignee("zhangsan");
        }else if(delegateTask.getName().equals("人事审批")){
            delegateTask.setAssignee("wangwu");
        }
    }
}
